package com.leyou.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author huangxin
 * @date 2019/4/18-17:43
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ExceptionEnum {

    CATEGORY_NOT_FOUND(404,"category not found"),
    BRAND_NOT_FOUND(404,"brand not found"),
    SPEC_PARAM_NOT_FOUND(404,"商品规格组参数没查到"),
    GOODS_NOT_FOUND(404,"商品没有找到"),
    GOODS_DETAIL_NOT_FOUND(404,"spudetail not found"),
    GOODS_STOCK_NOT_FOUND(404,"goods stock not found"),
    GOODS_SKU_NOT_FOUND(404,"sku not found"),
    BRAND_SAVE_ERROR(500,"brand save error"),
    GOODS_SAVE_ERROR(500,"goods save error"),
    BRAND_UPDATE_ERROR(500,"brand update error"),
    GOODS_UPDATE_ERROR(500,"goods update error"),
    UPLOAD_FILE_ERROR(500,"文件上传失败"),
    INVALID_FILE_TYPE(500,"无效文件类型"),
    SPEC_GROUP_NOT_FOUND(404,"商品规格组没查到"),
    GOODS_ID_CANNOT_BE_NULL(400,"商品id不能为空"),
    INVALID_USER_DATA_TYPE(400,"用户数据类型无效"),
    INVALID_VERIFY_CODE(400,"无效的验证码"),
    INVALID_USERNAME_PASSWORD(400,"用户名或密码错误"),
    CREATE_TOKEN_ERROR(500,"用户凭证生成失败"),
    UN_AUTHORIZED(403,"未授权"),
    CART_NOT_FOUND(404,"购物车为空"),
    CREATE_ORDER_ERROR(500,"创建订单失败"),
    STOCK_NOT_ENOUGH(500,"库存不足"),
    ORDER_NOT_FOUND(404,"订单查询失败"),
    ORDER_DETAIL_NOT_FOUND(404,"订单详情查询失败"),
    ORDER_STATUS_NOT_FOUND(404,"订单状态查询失败"),
    WX_PAY_ORDER_FAIL(500,"微信下单失败"),
    ORDER_STATUS_ERROR(500,"订单状态异常"),
    INVALID_SIGN(500,"无效的签名"),
    INVALID_ORDER_PARAM(500,"订单参数异常"),
    UPDATE_ORDER_STATUS_ERROR(500,"更新订单状态失败"),
    ;
    private int code;
    private String msg;

}
